package com.ruoyi.system.mapper;

import java.util.List;
import com.ruoyi.system.domain.Quotation;
import com.ruoyi.system.domain.QuotationItems;

/**
 * 报价单Mapper接口
 *
 * @author ruoyi
 */
public interface QuotationMapper
{
    /**
     * 查询报价单列表
     */
    public List<Quotation> selectQuotationList(Quotation quotation);

    /**
     * 根据报价单ID查询报价单
     */
    public Quotation getQuotationById(Long quotationId);

    /**
     * 根据报价单ID查询报价单明细
     */
    public List<QuotationItems> getQuotationItemsByQuotationId(Long quotationId);

    /**
     * 新增报价单
     */
    public int insertQuotation(Quotation quotation);

    /**
     * 新增报价单明细
     */
    public int insertQuotationItems(QuotationItems item);

    /**
     * 批量新增报价单明细
     */
    public int batchInsertQuotationItems(List<QuotationItems> items);

    /**
     * 修改报价单
     */
    public int updateQuotation(Quotation quotation);

    /**
     * 删除报价单
     */
    public int deleteQuotationById(Long quotationId);

    /**
     * 批量删除报价单
     */
    public int deleteQuotationByIds(Long[] quotationIds);

    /**
     * 删除报价单明细
     */
    public int deleteQuotationItemsByQuotationId(Long quotationId);

    /**
     * 获取待审批节点ID
     */
    public Long getPendingApprovalNodeId(Long templateId);

    /**
     * 获取指定前缀的最大编号
     */
    public String getMaxNumberByPrefix(String prefix);

    /**
     * 根据订单编号查询报价单
     */
    public Quotation selectQuotationByNumber(String number);

    /**
     * 查询待审批的报价单列表
     */
    public List<Quotation> selectPendingQuotations();
}
